package com.ujoin.action.collection;

import org.springframework.beans.factory.annotation.Autowired;

import com.ujoin.bean.Collection;
import com.ujoin.service.CollectionService;
import com.ujoin.util.ActionEnhanced;

import freemarker.template.utility.Execute;

public class CreateCollectionAction extends ActionEnhanced {

	private Collection collection;

	public Collection getCollection() {
		return collection;
	}

	public void setCollection(Collection collection) {
		this.collection = collection;
	}
	
	@Autowired
	private CollectionService collectionService;
	
	@Override
	public String execute() {
		setJson(collectionService.createCollection(collection));
		return SUCCESS;
	}
}
